<?php

$cas=getParameter("cas");
if ($cas!=null){
	?>
	
	<div class="ammn_cas">
	<?php








$SQL="SELECT
*,
DATE_FORMAT(ammn_casclinique.date, '%d/%m/%Y') as date
FROM
ammn_casclinique
WHERE
ammn_casclinique.id = $cas AND  ammn_casclinique.portalId = $portalId Order by date desc";
//echo $SQL;
Portal_log($SQL);
$rs=ew_LoadRecordset($SQL);

if ($rs && $rs->RecordCount()>0) {


//echo $count;

    ?>
	<div class="title"><?php echo $rs->fields["title"];   ?></div>
     <div class="auteurdate">Ecrit par <?php echo $rs->fields["auteur"];   ?> le <?php echo $rs->fields["date"];   ?></div>

    <br clear="all"/>
        <h2>Indications :</h2>

    <?php echo $rs->fields["indication"];   ?>
    <hr/>
<?php


    $SQL="SELECT
ammn_pictures.picture
FROM
ammn_pictures
WHERE
ammn_pictures.idCas = $cas ";
//echo $SQL;
    Portal_log($SQL);
    $rsimages=ew_LoadRecordset($SQL);

    if ($rsimages && $rsimages->RecordCount()>0) {


        while ( !$rsimages->EOF)  {

            $img=$rsimages->fields["picture"];
            ?>


                <a href="/apps/watermark.php?image=<?php echo "/".getFilesPath("gallery")."/".$img; ?>&stamp=<?php echo "/".getFilesPath("image")."/logo_stamp.png"; ?>" class="shadowBox frame"><img width="250" height="200"  src="/apps/watermark.php?image=<?php echo "/".getFilesPath("gallery")."/".$img; ?>&stamp=<?php echo "/".getFilesPath("image")."/logo_stamp.png"; ?>" alt="">
            <br clear="all"/>

            <?php

            $rsimages->MoveNext();
        }

    }


?>


    <h2>Commentaires :</h2>
<div>
    <?php echo $rs->fields["commentaires"];   ?>
</div>

    <div class="box-info"> <strong><?php echo $rs->fields["informations"];   ?></strong></div>

    <h3>Traceur :</h3>

    <?php echo $rs->fields["traceur"];   ?>

    <h3>Centre / Camera :</h3>

    <?php echo $rs->fields["centre_camera"];   ?>


    <?php

    }


        ?>

        <script type="text/javascript">

            $(document).ready(function() {
                $("a.shadowBox").fancybox();
            });
        </script>

</div>

<?php } ?>
